<template>
    <div class="body discussDetail" v-if="JSON.stringify(disscussInfo) != '{}'">
        <!-- 商品 -->
        <div class="assess-top detailremark">
            <div class="maleri30">
                <span class="user-portrait">
                    <img :src="disscussInfo.comment_info.head_pic" />
                </span>
                <span class="user-name" id="user-name">
                    {{ disscussInfo.comment_info.username }}
                </span>
                <!--<span class="vip-icon vip-copper-icon"></span>-->
                <span class="assess-date">{{
                    disscussInfo.comment_info.add_time | timer
                }}</span>
            </div>
        </div>
        <!-- 内容 -->
        <div class="assess-bottom detailcomment">
            <div class="maleri30">
                <span class="comment-item-star">
                    <span
                        class="real-star"
                        :class="
                            'comment-stars-width' +
                            disscussInfo.comment_info.goods_rank
                        "
                    ></span>
                </span>
                <p class="assess-content">
                    {{ disscussInfo.comment_info.content }}
                </p>
                <div class="product-img-module">
                    <ul class="jd-slider-container">
                        <a
                            v-for="(item, index) in disscussInfo.comment_info
                                .img"
                            :key="index"
                        >
                            <li class="jd-slider-item product-imgs-li">
                                <img :src="item" />
                            </li>
                        </a>
                    </ul>
                </div>
            </div>
        </div>

        <div class="zhanwei"></div>
    </div>
</template>

<script>
import { axiosPost } from '../../axios';
import { Toast } from 'vant';
export default {
    name: '',
    data() {
        return {
            disscussInfo: {},
        };
    },
    computed: {},
    mounted() {
        this.getDisscussInfo();
    },
    methods: {
        // 获取订单评价信息
        getDisscussInfo() {
            axiosPost(
                '/api/order/comment_info',
                {
                    comment_id: this.$route.query.comment_id,
                },
                (res) => {
                    // console.log(res);

                    if (res.status != 1) {
                        return Toast({
                            message: res.msg,
                            duration: 2000,
                        });
                    }
                    this.disscussInfo = res.data;
                }
            );
        },
    },
};
</script>

<style lang="less" scope>
.discussDetail {
    .comment-item-star {
        margin-top: 0;
        position: absolute;
        top: 3.7rem;
        left: 2.6rem;
    }

    .classreturn {
        background-color: #fff;
        border-bottom: 0;
    }
}
</style>
